package com.ac;


//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or

import java.util.regex.Matcher;
import java.util.regex.Pattern;

// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
    public static void main(String[] args) {
        String str = "2024.04.03-03.09.53: [LogBaseBuilding] [Flag] Destroyed FlagId: 39483 Owner: 76561199209834375 (835, 钱宝贝) Location: X=220955.219 Y=61314.047 Z=28853.002";
        String destroyedPattern = "(\\d{4}\\.\\d{2}\\.\\d{2}-\\d{2}\\.\\d{2}\\.\\d{2}): \\[LogBaseBuilding\\] \\[Flag\\] (Created|Destroyed) FlagId: (\\d+) Owner: (\\d+) \\((\\d+),(.+?)\\) Location: X=(-?\\d+\\.\\d+) Y=(-?\\d+\\.\\d+) Z=(-?\\d+\\.\\d+)";

        Pattern pattern2 = Pattern.compile(destroyedPattern);
        Matcher matcher2 = pattern2.matcher(str);
        if (matcher2.find()) {
            System.out.println(matcher2.group(1));
            System.out.println(matcher2.group(2));
            System.out.println(matcher2.group(3));
            System.out.println(matcher2.group(4));
            System.out.println(matcher2.group(5));
            System.out.println(matcher2.group(6));
            System.out.println(matcher2.group(7));
            System.out.println(matcher2.group(8));
        }

    }
}